<template>
	<view class="content">
		<view class="login_view">
			<view class="title">信智通</view>
			<view class="form_view">
				<form @submit="onSubmit" class="form_1">
					<view class="input_view">
						<image class="label_img" src="../../static/pngs/label_mine.png" mode="scaleToFill"></image>
						<input class="input_1" name="name" maxlength="13" placeholder="用户名"/>
					</view>
					<view class="input_view">
						<image class="label_img" src="../../static/pngs/label_password.png" mode="aspectFit"></image>
						<input class="input_1" name="password" password="true" maxlength="17" placeholder="密码"/>
					</view>
					<button class="login_button" form-type="submit">登录</button>
				</form>
			</view>			
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(option) {
			console.log(option.id)
		},
		data() {
			return {
				
			};
		},
		methods: {
			onSubmit(e) {
				console.log('form发生了submit事件，携带数据为：' + JSON.stringify(e.detail.value))
				var formdata = e.detail.value
				//进行登录验证操作，成功登录后返回的token保存到本地
				uni.switchTab({
				    url: '/pages/index/index'
				});
			}
		}
	}
</script>

<style lang="scss">
    page {
		background-color: #55aaff;
		height: 100%;
		// clear: both;
	}
	
	.content {
		position: fixed;
		height: 100%;
		background-color: #55aaff;
		// clear: both;
		/* display: flex; */
		/* flex-direction: column; */
	}
	
	.login_view {
		position: fixed;
		margin-top: 165rpx;
		width: 750rpx;
		height: 100%;
		// padding: 10rpx;
		clear: both;
		background-color: #FFFFFF;
		border-radius: 30px 30px 0 0;
	}
	
	.title {
		height: 200rpx;
		// background-color: #63A35C;
		line-height: 200rpx;
		font-size: 35rpx;
		text-align: center;
		font-weight: bold;
	}
	
	.form_view {
		height: 400rpx;
		width: 750rpx;
		display: flex;
		flex-direction: column;
		.form_1{
			// display: flex;
			// flex-direction: column;
			margin-left: 50rpx;
			margin-right: 50rpx;
			margin-top: 100rpx;
			// background-color: #666666;
			.input_view {
				height: 100rpx;
				border-bottom: 1px solid #d3d7d4;
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: space-between;
				.label_img{
					width: 35rpx;
					height: 35rpx;
				}
				.input_1 {
					// background-color: #007AFF;
					width: 550rpx;
				}
			}
			.login_button {
				line-height: 80rpx;
				color: #FFFFFF;
				font-size: 25rpx;
				height: 80rpx;
				margin-top: 100rpx;
				background-color: #55aaff;
				-moz-box-shadow:2px 2px 10px #A9A9A9;
				-webkit-box-shadow:2px 2px 10px #A9A9A9;
				box-shadow:2px 2px 10px #A9A9A9;
			}
		}	
	}
</style>
